package com.api.demo.dto.business.invoice;

import com.api.demo.dto.business.ApiDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @description: 申请开票DTO
 * @author: yanming
 * @createDate: 2022/12/29 09:18
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ApplicationInvoiceDTO extends ApiDTO {

    @ApiModelProperty(value = "地址ID", required = true)
    @NotNull(message = "地址ID不能为空")
    private Long addressId;

    @ApiModelProperty(value = "开票备注")
    private String applicationDesc;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "开票类目ID", required = true)
    @NotNull(message = "开票类目ID不能为空")
    private Long invoiceCatalogId;

    @ApiModelProperty(value = "发票类型", required = true)
    @NotBlank(message = "发票类型")
    private String invoiceType;

    @ApiModelProperty(value = "发票方式", required = true)
    @NotBlank(message = "发票方式不能为空")
    private String invoiceWay;

    @ApiModelProperty(value = "订单ID", required = true)
    @NotBlank(message = "订单ID不能为空")
    private String id;

    @ApiModelProperty(value = "发票回调地址")
    @Length(max = 500, message = "回调地址长度不能超过500")
    private String notifyUrl;

    /**
     * 预留字段，暂时不用
     */
    @ApiModelProperty(value = "开票金额")
    private BigDecimal billingAmount;
}